<{include file="Common/head"}>
<{include file="Common/menu"}>

<link href="_index_/yy/index.css" rel="stylesheet">
<link href="_index_/yy/laydate.css" rel="stylesheet">
<script src="_index_/yy/laydate.js"></script>
<script type="text/javascript" src="_index_/laydate/laydate.js"></script>

<script type="text/javascript" src="_index_/echarts/echarts.min.js"></script>

<style type="text/css">
    *{font-size: 15px!important;}
    .select_data h3{ float: left; }
    .select_data .laydate-box{margin-top: 20px; }
    .laydate-box{width:12%!important;}
    #laydateInput{}
</style>

<section class="Hui-article-box">




    <div class="select_data">
        <h3>选择日期：</h3>
        <div class="laydate-box">
            <input type="text" id="laydateInput"/>
            <div class="select-date">
                <div class="select-date-header">
                    <ul class="heade-ul">
                        <li class="header-item header-item-one">
                            <select name="" id="yearList"></select>
                        </li>
                        <li class="header-item header-item-two" onselectstart="return false">
                            <select name="" id="monthList"></select>
                        </li>
                        <li class="header-item header-item-three" onselectstart="return false">
                            <span class="reback">回到今天</span>
                        </li>
                    </ul>
                </div>
                <div class="select-date-body">
                    <ul class="week-list">
                        <li>日</li><li>一</li><li>二</li><li>三</li><li>四</li><li>五</li><li>六</li>
                    </ul>
                    <ul class="day-tabel"></ul>
                </div>
            </div>
        </div>
        <input class="btn btn-success radius count" type="button" value="统计">
    </div>
    <div id="container" style="width: 100%;height:550px;"></div>

</section>





<script type="text/javascript">
    <?php if(isset($mapdata)){ ?>
        var dom = document.getElementById("container");
        var myChart = echarts.init(dom);
        var app = {};
        option = null;
        app.title = '坐标轴刻度与标签对齐';
        myChart.setOption(<?php echo $mapdata; ?>, true);
    <?php } ?>
</script>

<script type="text/javascript">
    $(function(){
        $(".count").on("click",function(){
            date = $("#laydateInput").val();
            console.log(date);
            $.post("/index/Set/count",{"date":date},function(e){
                setmap(e);
            });

        });


        function setmap(mapdata){
            var dom = document.getElementById("container");
            var myChart = echarts.init(dom);
            var app = {};
            option = null;
            app.title = '坐标轴刻度与标签对齐';
            //console.log(mapdata);
            myChart.setOption(eval('(' + mapdata + ')'), true);
        }
    });

</script>

<{include file="Common/footer"}>

